/**
 * FileName: HttpContextUtil
 * Author:   NiPengFei
 * Date:     2018/6/4 16:31
 * Description: 获取Http请求信息 工具类
 */
package com.npf.imgserver.utils;

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;

/**
 * 〈功能简述〉 
 * 〈获取Http请求信息 工具类〉
 *
 * @author NiPengFei
 * @create 2018/6/4
 * @since 1.0.0
 */
public class HttpContextUtil {
    public static HttpServletRequest getHttpServletRequest() {
        return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
    }

}